var Professor = require('../classes/professor');
var ProfessorMapper = require('../mappers/professor.mapper');

//TODO
function ProfessorController() {
    var mapper = new ProfessorMapper();

    this.add = function(req) {
        var p = new Professor();
        p.setNome(req.body.nome);
        p.setUsername(req.body.username);
        p.setPassword(req.body.password);
        p.setEmail(req.body.email);
        p.setMatricula(req.body.matricula);
        p.setDepartamento(req.body.departamento);
        //FIXME criar o objeto disciplina, etc etc
        p.setDisciplinasPreferidas(req.body.preferidas);
        mapper.add(p);
    }
}

module.exports = ProfessorController;
